﻿using Microsoft.CodeAnalysis.CSharp.Syntax;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UMLSynthesizer.CSharpAnalyzer.Elements;
using UMLSynthesizer.CSharpAnalyzer.Helpers;
using UMLSynthesizer.LangAnalyzer.Elements;
using UMLSynthesizer.LangAnalyzer.Expressions;
using UMLSynthesizer.LangAnalyzer.Statements;

namespace UMLSynthesizer.CSharpAnalyzer.Expressions
{
    class CSharpSizeOfExpression : CSharpExpressionBase, ISizeOfExpression
    {
        #region Constructor

        public CSharpSizeOfExpression(SizeOfExpressionSyntax expressionNode,
            IExpressionBase parentExpression,
            IStatementBase parentStatement)
            : base(expressionNode, parentExpression, parentStatement, ExpressionKinds.SizeOf) { }

        #endregion

        #region Properties

        public ITypeBase Type
        {
            get
            {
                return (ProjectOwner as CSharpProjectElement)
                    .GetTypeReference((expressionNode as SizeOfExpressionSyntax).Type);
            }
        }

        #endregion
    }
}
